package Controller.BankController;

import ViewOption.bankVo;
import com.alibaba.fastjson.JSON;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * 获取银行名称的数据
 */
@WebServlet(name = "BankMsgServlet", urlPatterns = {
        "/api/Bank/BankMsgServlet"
})
public class BankMsgServlet extends HttpServlet {
    private final bankVo bankVo = new bankVo();

    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        response.getWriter().print(JSON.toJSONString(bankVo.getBankMsgAll()));
        return;
    }

    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        doPost(request, response);
    }
}
